package factory.goods;

import factory.abstractfactory.PizzaIngredientFactory;

/**
 * User:xuzhidian
 * Date:2018/3/13
 * Time:22:14
 */
public class CheesePizza extends Pizza implements IPizza {
    //原料由工厂生产
    private PizzaIngredientFactory pizzaIngredientFactory;

    public CheesePizza(PizzaIngredientFactory pizzaIngredientFactory) {
        this.pizzaIngredientFactory = pizzaIngredientFactory;
    }

    public CheesePizza() {
        
    }

    @Override
    public void prepare() {
        //由传入工厂实现原料生产
        this.cheese = pizzaIngredientFactory.createCheese();
    }

    @Override
    public void bake() {

    }

    @Override
    public void cut() {

    }

    @Override
    public void box() {

    }
}
